﻿using System.ComponentModel.DataAnnotations;
using HiSportApplet.Core.Entity.Orders;
using HiSportApplet.Core.Enum;
using SqlSugar;

namespace HiSportApplet.Application.Service.Order.OrderSiteManagement.Dtos
{
    public class OrderSiteDto : OrderSite
    {

        /// <summary>
        /// 场馆信息
        /// </summary>
        public BasVenuesDto? BasVenues { get; set; }

        /// <summary>
        /// 场馆图片集合
        /// </summary>
        public List<string> ImageList { get; set; }

        /// <summary>
        /// 场地类型名称
        /// </summary>
        public string SiteTypeName { get; set; }

        /// <summary>
        /// 运行项目名称
        /// </summary>
        public string SportsEventsName { get; set; }

        /// <summary>
        /// 运动项目类型编码
        /// </summary>
        public string SportsEventsTypeCode { get; set; }

        /// <summary>
        /// 单据详情
        /// </summary>
        public List<OrderSiteInfoDto> Dtls { get; set; }

        /// <summary>
        /// 查询类型-返回订单类型(暂未赋值)
        /// 1-待付款；
        /// 2-待使用；
        /// 3-使用中；
        /// 4-已完成
        /// 5-已取消
        /// SearchTypeEnum
        /// </summary>
        public SearchTypeEnum BusinessId { get; set; }
    }

    /// <summary>
    /// 创建主订单dto
    /// </summary>
    public class OrderSiteCreateDto
    {

        /// <summary>
        /// 预定时间
        /// </summary>
        [SugarColumn(ColumnDescription = "预定时间", IsNullable = true)]
        public DateTime ScheduledTime { get; set; }

        /// <summary>
        /// 场地类型
        /// </summary>
        public long SiteTypeId { get; set; }

        /// <summary>
        /// 场地
        /// </summary>
        public long SiteId { get; set; }

        ///  <summary>
        /// 场馆ID
        /// </summary>
         public long venuesId { get; set; }

        /// <summary>
        /// 会员ID
        /// </summary>
        public long MemberId { get; set; }

        /// <summary>
        /// 会员名称
        /// </summary>
        public string MemberName { get; set; }

        /// <summary>
        /// 会员电话
        /// </summary>
        public string Phone { get; set; }


        /// <summary>
        /// 订单来源
        /// </summary>
        public OrderSourceEnum? OrderSource { get; set; }



        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        public List<OrderSiteInfoCreateDto> OrderSiteInfos { get; set; }
    }

    /// <summary>
    /// 创建子订单dto
    /// </summary>
    public class OrderSiteInfoCreateDto
    {
        /// <summary>
        /// 预定时间
        /// </summary>
        public DateTime ScheduledTime { get; set; }

        public long OrderId { get; set; }

        /// <summary>
        /// 场地类型
        /// </summary>
        public long SiteTypeId { get; set; }

        /// <summary>
        /// 场地
        /// </summary>
        public long SiteId { get; set; }


        /// <summary>
        /// 开始
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 结束
        /// </summary>
        public string EndTime { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        public decimal OriginalPrice { get; set; }


        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal ActualPayAmount { get; set; }



        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(300)]
        public string Remark { get; set; }
    }
}
